package com.liunian.subject.infra.basic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liunian.subject.infra.basic.entity.SubjectCategory;
import com.liunian.subject.infra.basic.entity.SubjectLabel;
import com.liunian.subject.infra.basic.mapper.SubjectCategoryMapper;
import com.liunian.subject.infra.basic.mapper.SubjectLabelMapper;
import com.liunian.subject.infra.basic.service.SubjectCategoryService;
import com.liunian.subject.infra.basic.service.SubjectLabelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
*
*/
@Service
@Slf4j
public class SubjectLabelServiceImpl extends ServiceImpl<SubjectLabelMapper, SubjectLabel> implements SubjectLabelService {

    @Resource
    private SubjectLabelMapper subjectLabelMapper;

    @Override
    public int updateLabel(SubjectLabel subjectLabel) {
        return subjectLabelMapper.updateLabel(subjectLabel);
    }

    @Override
    public List<SubjectLabel> selectBatchIds(List<Long> labelIds) {
        return subjectLabelMapper.selectBatchIds(labelIds);
    }

    @Override
    public List<SubjectLabel> selectLabels(List<Long> labelIds) {
        return subjectLabelMapper.selectBatchIds(labelIds);
    }

    @Override
    public boolean saveSubjectLabel(SubjectLabel subjectLabel) {
        return this.save(subjectLabel);
    }

    @Override
    public List<SubjectLabel> queryLabel(SubjectLabel subjectLabel) {
        return subjectLabelMapper.queryLabel(subjectLabel);
    }
}
